﻿cmake_minimum_required(VERSION 2.8.3)
project(node_test)

set(CMAKE_BUILD_TYPE Debug)

set(CMAKE_CXX_STANDARD 11)

find_package(
    catkin REQUIRED COMPONENTS
    roscpp nodelet pluginlib
    ecl_exceptions ecl_threads
    std_msgs message_generation
)

include_directories(include ${catkin_INCLUDE_DIRS})

add_message_files(
    FILES
    Hello.msg
)

generate_messages()

catkin_package(
   INCLUDE_DIRS include
   LIBRARIES ${CMAKE_PROJECT_NAME}
   CATKIN_DEPENDS roscpp std_msgs message_runtime
)

add_executable(${CMAKE_PROJECT_NAME} src/node_test.cpp)
target_link_libraries(${CMAKE_PROJECT_NAME} ${catkin_LIBRARIES} pthread)

string(REGEX MATCH "^.*(/devel/.private)" WORKSPACE_DIR ${CATKIN_DEVEL_PREFIX})
set(WORKSPACE_DIR "${WORKSPACE_DIR}/../..")

# install(TARGETS robot_ros robot_nodelet # servo_node
#     ARCHIVE DESTINATION ${CATKIN_INSTALL_DIR}/../bin
#     LIBRARY DESTINATION ${CATKIN_INSTALL_DIR}/../bin
#     RUNTIME DESTINATION ${CATKIN_INSTALL_DIR}/../bin
# )
